package com.star.test.entity;

import java.awt.*;

// 圆形
public class Circle extends Shape implements Area {

    public Circle(double s) {
        super(s);
    }

    @Override
    public double getArea() {
        double circumference = super.getS();
        double radius = circumference / Math.PI / 2;
        double area = Math.PI * radius * radius;
        return area;
    }
}